/**
 * Created by admin on 2017/2/8.
 *
 * http://www.jb51.net/article/59815.htm
 *
 */
var fs = require('fs');

(async function() {
  var files = [];

  // 读取文件列表
  await fs.readdir(process.cwd(), function (err, fils) {
    // console.log(fils.length);
    files = fils;
  });

  files.forEach(file => console.log(file));
})();
